package com.wuliu.system.service.impl;

import java.util.List;

import com.wuliu.common.core.domain.entity.BasCust;
import com.wuliu.common.exception.ServiceException;
import com.wuliu.common.utils.DateUtils;

import javax.annotation.Resource;

import com.wuliu.common.utils.SecurityUtils;
import com.wuliu.common.utils.StringUtils;
import com.wuliu.system.domain.TspDrivingRecord;
import com.wuliu.system.domain.dto.applet.OpDrivingRecordDto;
import org.springframework.stereotype.Service;
import com.wuliu.system.mapper.TspDrivingTrackMapper;
import com.wuliu.system.domain.TspDrivingTrack;
import com.wuliu.system.service.ITspDrivingTrackService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

/**
 * 行车记录操作记录Service业务层处理
 *
 * @author realue
 * @date 2023-11-10
 */
@Service
public class TspDrivingTrackServiceImpl extends ServiceImpl<TspDrivingTrackMapper, TspDrivingTrack> implements ITspDrivingTrackService {
    @Resource
    private TspDrivingTrackMapper tspDrivingTrackMapper;

    /**
     * 查询行车记录操作记录
     *
     * @param id 行车记录操作记录主键
     * @return 行车记录操作记录
     */
    @Override
    public TspDrivingTrack selectTspDrivingTrackById(String id) {
        return tspDrivingTrackMapper.selectTspDrivingTrackById(id);
    }

    /**
     * 查询行车记录操作记录列表
     *
     * @param tspDrivingTrack 行车记录操作记录
     * @return 行车记录操作记录
     */
    @Override
    public List<TspDrivingTrack> selectTspDrivingTrackList(TspDrivingTrack tspDrivingTrack) {
        return tspDrivingTrackMapper.selectTspDrivingTrackList(tspDrivingTrack);
    }

    /**
     * 新增行车记录操作记录
     *
     * @param tspDrivingTrack 行车记录操作记录
     * @return 结果
     */
    @Override
    public int insertTspDrivingTrack(TspDrivingTrack tspDrivingTrack) {
        tspDrivingTrack.setCreateTime(DateUtils.getNowDate());
        return tspDrivingTrackMapper.insertTspDrivingTrack(tspDrivingTrack);
    }

    /**
     * 修改行车记录操作记录
     *
     * @param tspDrivingTrack 行车记录操作记录
     * @return 结果
     */
    @Override
    public int updateTspDrivingTrack(TspDrivingTrack tspDrivingTrack) {
        tspDrivingTrack.setUpdateTime(DateUtils.getNowDate());
        return tspDrivingTrackMapper.updateTspDrivingTrack(tspDrivingTrack);
    }

    /**
     * 批量删除行车记录操作记录
     *
     * @param ids 需要删除的行车记录操作记录主键
     * @return 结果
     */
    @Override
    public int deleteTspDrivingTrackByIds(String[] ids) {
        return tspDrivingTrackMapper.deleteTspDrivingTrackByIds(ids);
    }

    /**
     * 删除行车记录操作记录信息
     *
     * @param id 行车记录操作记录主键
     * @return 结果
     */
    @Override
    public int deleteTspDrivingTrackById(String id) {
        return tspDrivingTrackMapper.deleteTspDrivingTrackById(id);
    }

}
